//余额流水
import { get_balance } from "@/api/balance";
export default {
  namespaced: true,
  state: {
    page: 1,
    limit: 10,
    rows: [],
    total: "",
    phone: "",
  },
  mutations: {
    toggle: (state, payload) => {
      state.total = payload.total;
      state.rows = payload.rows;
    },
    serach: (state, payload) => (state.phone = payload),
  },
  actions: {
    getBalanceList: async ({ commit, state }) => {
      const { page, limit, phone } = state;
      const data = await get_balance({ page, limit, phone });
      commit("toggle", data);
    },
  },
  getters: {},
};
